package com.feihong.yw189.adapter.holder;

import android.support.v7.widget.RecyclerView;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.cjj.Util;
import com.feihong.yw189.R;
import com.feihong.yw189.model.HomeFunList;

import static com.feihong.yw189.http.Host.HTTP_HOME;

/**
 * @Author wangziheng
 * @ProjectName ywydt
 * @ClassName HomePageFunMenuHolder
 * @package com.feihong.yw189.adapter.holder
 * @data 2019/3/4 17:11
 * @Describe
 * @Change
 */
public class HomePageFunMenuHolder extends RecyclerView.ViewHolder {
    private ImageView mFunIcon;
    private TextView mFunName;

    public HomePageFunMenuHolder(View itemView) {
        super(itemView);
        mFunIcon = itemView.findViewById(R.id.home_page_fun_menu_item_layout_img);
        mFunName = itemView.findViewById(R.id.home_page_fun_menu_item_layout_tv);
    }

    public void setData(HomeFunList homeFunList) {
        String funName = homeFunList.getFunName();
        Glide.with(mFunIcon).load(HTTP_HOME + homeFunList.getFunIcon()).into(mFunIcon);
        mFunName.setText(funName);
    }
}
